package com.sokal.easycare.modules.ad.entity;

import org.hibernate.validator.constraints.Length;
import java.util.List;
import com.google.common.collect.Lists;

import com.sokal.easycare.common.persistence.DataEntity;

/**
 * 广告Entity
 * @author liliangdong
 * @version 2017-05-03
 */
public class AdInfo extends DataEntity<AdInfo> {
	
	private static final long serialVersionUID = 1L;
	private String title;		// 标题
	private String keywords;		// 关键词
	private List<AdInfoFile> adInfoFileList = Lists.newArrayList();		// 子表列表
	
	public AdInfo() {
		super();
	}

	public AdInfo(String id){
		super(id);
	}

	@Length(min=1, max=255, message="标题长度必须介于 1 和 255 之间")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	@Length(min=0, max=255, message="关键词长度必须介于 0 和 255 之间")
	public String getKeywords() {
		return keywords;
	}

	public void setKeywords(String keywords) {
		this.keywords = keywords;
	}
	
	public List<AdInfoFile> getAdInfoFileList() {
		return adInfoFileList;
	}

	public void setAdInfoFileList(List<AdInfoFile> adInfoFileList) {
		this.adInfoFileList = adInfoFileList;
	}
}